1. Field of the Invention
The present invention relates to a technique that processes image data, specifically to a technique that implements the overwriting of images at a low cost at high speed.
2. Description of the Related Art
First of all, the overwriting of images that the present invention aims at will be defined. That is, the overwriting of images here signifies processing to overwrite an image with another unit of image. For example, the overwriting here includes a superscription by an opaque ink, which is processed by the PS (PostScript, xe2x80x9cPostscript reference manual 2nd versionxe2x80x9d(Adobe Systems, ASCII), etc., PostScript is the trademark of US Adobe Systems Corp.) being a type of the PDL (Page Description Language). The unit image as defined above may be a sheet of raster as defined in the PDL, or a piece of plotting object.
The overwriting on the spatial coordinates of images cannot be carried out by one directional processing. The reason is as follows. The general image processing can be carried out in one direction, for example, from the upper left to the lower right, which includes, for example, expansion, contraction, and spatial filtering, etc. xe2x80x9chandbook image analysisxe2x80x9d (Takagi, Shimoda, Tokyo Univ. Publishing association). In contrast to this, in the overwriting, the image with which the overwriting is executed can be inputted at random to the spatial coordinates of the output image. Therefore, as far as it is processed in order of input, the image cannot be processed, on the output image, in order of the spatial coordinates. FIG. 13 illustrates the overwriting. In the drawing, 210, 211 show plotting objects. The drawing illustrates a processing to overwrite the object 210 with the object 211. It is clear from the drawing that the random scan on the output image and page memories for the overwriting are needed.
In this manner, the overwriting proceeds while adding a process to data on the halfway of a certain process. When this is viewed as a data flow, it is found that the so-called feedback loop is produced. In general, a feedback loop produces an overhead to the processing time to make the control complicated, and the loop should be shorter.
While the page memory is necessary, the memory size should be small from the view point of cost. Accompanied with a higher quality of images that the image processing devices present in recent years, the resolution of the images is enhanced. Although the unit price of memory is significantly reduced, the reduction of quantity in using memories is still an important problem. Now, the conventional technique to reduce the page memory will be explained.
As the first conventional example, the Japanese Published Unexamined Patent Application No. Hei 5-31974 will be explained. The basic theory of the first conventional example is to apply the image compression coding while storing the image on which the overwriting has been completed in the page memory, and thereby reduce the necessary quantity of memory.
FIG. 14 illustrates a block diagram of the first conventional example. However, the terms are changed to match the explanation of this invention, without damaging the gist of the disclosed contents of the Published Application, and unnecessary parts for the explanation are omitted. In the drawing, 10 denotes an image input unit, 20 an overwriting unit, 30 a small area buffer, 40 an output switch unit, 50 an encoding unit, 60 a compact page memory, 70 a decoding unit, 80 an image output unit, 110 input image data, 120, 130 processed image data, 140 stored image data, 150 output image data, 160, 170 coded image data, and 180 decoded image data.
Each of the units in FIG. 14 will be explained. The image input unit 10 enters image data from an external device. The overwriting unit 20 overwrites the stored image data 140 with the input image data 110, using a predetermined small area as a processing unit, to send out the processed image data 120 to the small area buffer 30. The small area buffer 30 stores the processed image data 120 to send them out as the processed image data 130 to the output switch unit 40. If the overwriting of the processed image data 130 has been completed, the output switch unit 40 sends them out to the encoding unit 50 as the output image data 150; and if not, the output switch unit 40 sends them out to the overwriting unit 20 as the stored image data 140. The encoding unit 50 applies a specific compression coding to the output image data 150 to send out the result to the compact page memory 60 as the coded image data 160. The compact page memory 60 stores the coded image data 160, and when the coded image data corresponding to all the small areas are complete, sends them out to the decoding unit 70 as the coded image data 170. The decoding unit 70 performs the decoding processing as an inverse transformation of the compression coding by the encoding unit 50, and sends out the result to the image output unit 80 as the decoded image data 180. The image output unit 80 delivers the decoded image data 180 to an external device.
Based on the above configuration, the first conventional example will be explained as to the image processing procedure. FIG. 15 illustrates a flowchart explaining the operation of the first conventional example.
First, the terms will be defined. In the first conventional example, the image is divided into partial images. The divided partial images are called small areas. And, the image now being processed will be called an image in attention, and similarly the small area now being processed will be called a small area in attention.
Referring to FIG. 15, the operation of the first conventional example will now be explained. At S10, the image input unit 10 inputs the input image data 110. At S20, the input image data 110 are individually processed as a small area unit, and if the part now being inputted is correspondent to the small area in attention, the step advances to step S30; and if not, it advances to S50. At S30, the small area in attention stored in the small area buffer 30 is read as the stored image data 140 through the output switch unit 40. At S40, the overwriting unit 20 executes the overwriting of the input image data 110 on the stored image data 140. At S50, since the input image data 110 are not correspondent to the small area in attention, the small area is skipped. At S60, if the processing of all the small areas in attention is completed, the step advances to S70; and if not, it returns to S20. At S70, if the processing of all the input images is completed, the step advances to S80; and if not, it advances to S90. At S80, the encoding unit 50 executes the encoding to the output image data 150 on which the overwriting has been finished, and stores the result in the compact page memory 60. At S90, the image in attention is shifted to the next image. At S100, if the overwriting on all the small areas is completed, the step advances to S110; and if not, it advances to S120. At S110, the decoding unit 70 executes the decoding processing to the coded image data 170, and outputs the result to the image output unit 80. At S120, the small area in attention is shifted to the next small area, and the image in attention is shifted to the leading image of the input image data 110.
In the foregoing operation, the encoding unit 50 and the decoding unit 70 execute the image compression coding such that the data size of the coded image data 160 becomes smaller than that of the processed image data 130. The first conventional example presents an example of the compression using the DCT (Discrete Cosine Transform).
According to the first conventional example, since the image data on which the overwriting has been completed are encoded to be stored, the quantity of memory equivalent to the code quantity for one sheet of image is needed to be provided, and the memory quantity can be reduced. Thus, the memory intended to store one sheet of image by means of the image compression is called a compact page memory.
The first conventional example assumes a configuration to execute the encoding processing in the pixel order of the output image. Accordingly, it is required to repeatedly input the input image to be paired with the output image, which invites an increase of processing time.
As the second conventional example to solve this problem, the Japanese Published Unexamined Patent Application No. Hei 5-37789 will be explained. The basic theory of the second conventional example is to execute the image compression coding of images on the halfway of the overwriting, store the result in the page memory, and finish up the image input at one time while reducing the necessary memory quantity.
FIG. 16 illustrates a block diagram of the second conventional example. In the drawing, the same parts as in FIG. 14 are given the same symbols, and the explanation will be omitted. 141 denotes stored image data, 181 decoded image data.
Based on the above configuration, the second conventional example will be explained as to the image processing procedure. FIG. 17 illustrates a flowchart explaining the operation of the second conventional example. In the drawing, the same parts as in FIG. 15 are given the same symbols, and the explanation will be omitted.
Referring to FIG. 17, the operation of the second conventional example will now be explained. At S31, the coded image data 170 of the small area in attention stored in the compact page memory 60 are read out, the encoding unit 70 executes the encoding processing to the coded image data 170 read out, and the resultant data are inputted as the stored image data 141 to the overwriting unit 20 through the output switch unit 40. At S81, regardless of whether the overwriting of the small area in attention is completed or not, the encoding unit 50 executes the encoding processing to the processed image data 130.
According to the second conventional example, the memory quantity can be reduced by the compact page memory in the same manner as the first conventional example. And, since the small area images on the halfway of the overwriting are also stored in the compact page memory, repeated inputs of one and the same image become unnecessary.
On the other hand, since all the small area images including those under process are made to be encoded, the load to the encoding processing becomes heavy, thus producing an overhead to the processing time. And, in case of employing the irreversible encoding as the encoding system, since the encoding is repeated to the same image, errors called as the generation noise are accumulated, which invites deterioration of image quality.
The problems of the conventional examples will be summarized. FIG. 18 illustrates examples of the overwriting sequences by the conventional examples. Here, the sequence to overwrite the input image 1 with the input image 2 is conceived.
According to the first example, in order to process a part corresponding to a small area 222, small areas 220, 221, 223 are skipped. Since the other parts also produce the same skips, the overhead relating to the image input is understood as significant. According to the second conventional example on the other hand, before overwriting of the small area 223 on the small area 220, the small area 220 has to be decoded. This corresponds to the feedback of the stored image data 141, but the inclusion of the decoding operation prolongs this feedback loop, and also invites an increase of processing time. Further, as mentioned above, the deterioration of image quality will be a problem in the irreversible encoding.
The present invention has been made in view of the above circumstances, and provides an image processing device that implements the overwriting of an image in a low cost at high speed.
In accordance with one aspect of the invention, the image processing device that executes overwriting on an image once inputted and to be fed back and another image newly inputted is provided with an image input part that inputs the image, an overwriting part that executes the overwriting of the input image and the image to be fed back with units of partial images, a partial image storage part that holds a partial image outputted from the overwriting part as an overwriting result, a processing prediction part that executes a processing prediction for the partial image of the partial image storage part, a determination part that determines whether the encoding part executes the image compression coding of the partial image or not, on the basis of the processing prediction by the processing prediction part, an encoding part that executes image compression coding of the image, a data storage part that stores a partial image encoded and a partial image not encoded, a decoding part that performs decoding processing being reverse processing of the coding processing executed by the encoding part, an output switch part that switches, if an output from the data storage part is the partial image not encoded, the output to the overwriting part, and switches the output to the decoding part, if it is the partial image encoded, and an image output part that outputs an image acquired by the decoding part. In the device, the processing prediction executes a prediction as to whether or not the overwriting is to be executed thereafter, and the determination part sends only the partial image on which the overwriting has been finished to the encoding part.
In this configuration, a partial image predicted as unnecessary for the overwriting is stored as a code, and a partial image predicted as necessary for the overwriting is stored as it is. Therefore, when a partial image for the overwriting is fed back, the partial image can be outputted as it is without executing the decoding, which enables high speed processing. Moreover, a partial image having completed the processing is compressed, which leads to an effective use of the memory resource.
In accordance with another aspect of the invention, the image processing device that executes overwriting of an image once inputted and fed back and another image newly inputted is provided with an image input part that inputs the image, an overwriting part that executes the overwriting of the input image and the image fed back with units of partial images, a partial image storage part that holds a partial image outputted from the overwriting part as an overwriting result, a processing prediction part that executes a processing prediction for the partial image of the partial image storage part, a determination part that determines whether the encoding part executes the image compression coding of the partial image or not, on the basis of the processing prediction by the processing prediction part, an encoding part that executes image compression coding of the image, a data storage part that stores a partial image encoded and a partial image not encoded, a code conversion part that executes a code conversion on a code outputted from the data storage part to reduce a code amount; an output switch part that switches, if an output from the data storage part is the partial image not encoded, the output to the overwriting part, and switches the output to the code conversion part, if it is the code, and a code output part that outputs a code acquired by the code conversion part. In the device, the processing prediction executes a prediction as to whether or not the overwriting is to be executed thereafter, and the determination part sends only the partial image on which the overwriting has been finished to the code conversion part.
Also in this configuration, the overwriting can be executed at high speed, and the memory resource can be used effectively.
In accordance with another aspect of the invention, the image processing device that executes overwriting of an image once inputted and to be fed back and another image newly inputted is provided with an image input part that inputs the image, an overwriting part that executes the overwriting of the input image and the image to be fed back with a unit of a partial image, a partial image storage part that holds a partial image outputted from the overwriting part as an overwriting result, a first data storage part that stores a partial image outputted from the partial image storage part, and feeds back the partial image stored therein to the overwriting part, an encoding part that executes image compression coding of the partial image outputted from the partial image storage part, a second data storage part that stores a code outputted from the encoding part, a decoding part that applies to a code outputted from the second storage data part decoding processing being reverse processing of the coding processing executed by the encoding part, and an image output part that outputs an image acquired by the decoding part. In the device, the partial image is stored in the first data storage part and the second data storage part, respectively, in a form of the image and the code.
Also in this configuration, the overwriting can be executed at high speed, and the memory resource can be used effectively.
In accordance with another aspect of the invention, the image processing device that executes overwriting of an image once inputted and to be fed back and another image newly inputted is provided with an image input part that inputs the image, an overwriting part that executes the overwriting of the input image and the image fed back with a unit of a partial image, a partial image storage part that holds a partial image outputted from the overwriting part as an overwriting result, a first data storage part that stores a partial image outputted from the partial image storage part, and feeds back the partial image stored therein to the overwriting part, an encoding part that executes image compression coding of the partial image outputted from the partial image storage part, a second data storage part that stores a code outputted from the encoding part, a code conversion part that executes a code conversion on a code outputted from the second data storage part to reduce a code amount, and a code output part that outputs a code acquired by the code conversion part. In the device, the partial image is stored in the first data storage part and the second data storage part, respectively, in a form of the image and the code.
Also in this configuration, the overwriting can be executed at high speed, and the memory resource can be used effectively.
Further, the invention can be accomplished also in a method and a software product.